﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.FormWhx.Storehouse
{
    public class SorehouseModels:AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 仓库编码
        /// </summary>
        [Required]
        [StringLength(50)]
        public string WarehouseCode { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        [Required]
        [StringLength(100)]
        public string WarehouseName { get; set; }
        /// <summary>
        /// 仓库容量
        /// </summary>
        public int WarehouseCapacity { get; set; }
        /// <summary>
        /// 仓库地址
        /// </summary>
        [StringLength(200)]
        public string WarehouseAddress { get; set; }
        /// <summary>
        /// 库管部门  下拉框
        /// </summary>
        [StringLength(100)]
        public string ManagementDept { get; set; }
        /// <summary>
        /// 仓库主管  下拉框选择用户
        /// </summary>
        [StringLength(100)]
        public string WarehouseManager { get; set; }
        /// <summary>
        /// 库位数量
        /// </summary>
        public int LocationCount { get; set; }
        /// <summary>
        /// 仓库状态
        /// </summary>
        [StringLength(50)]
        public string WarehouseStatus { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        [StringLength(20)]
        public string Phone { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 仓库锁定状态
        /// </summary>
        public bool IsLocked { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string Remarks { get; set; }
        protected SorehouseModels() { }
        public SorehouseModels( Guid id, string warehouseCode, string warehouseName, int warehouseCapacity, string warehouseAddress, string managementDept, string warehouseManager, int locationCount, string warehouseStatus, string phone, int sort, bool isLocked, string remarks):base(id)
        {
            WarehouseCode = warehouseCode ?? throw new ArgumentNullException(nameof(warehouseCode));
            WarehouseName = warehouseName ?? throw new ArgumentNullException(nameof(warehouseName));
            WarehouseCapacity = warehouseCapacity;
            WarehouseAddress = warehouseAddress;
            ManagementDept = managementDept;
            WarehouseManager = warehouseManager;
            LocationCount = locationCount;
            WarehouseStatus = warehouseStatus;
            Phone = phone;
            Sort = sort;
            IsLocked = isLocked;
            Remarks = remarks;
        }

    }
}
